package cn.four.hqServer.modules.cardBinding.controller;

import cn.four.hqServer.common.result.Result;
import cn.four.hqServer.modules.cardBinding.dto.UserValidDto;
import cn.four.hqServer.modules.cardBinding.service.CardRebindService;
import cn.four.hqServer.modules.cardBinding.service.CardWithdrawService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.validation.Valid;

/**
 * <p>
 * 前端控制
 * </p>
 *
 */
@CrossOrigin
@RestController
@RequestMapping("/cardBinding")
public class CardRebindController {
    @Resource
    private CardRebindService cardRebindService;

    @Resource
    private CardWithdrawService userInfoService;

    /**
     * 银行卡重新绑定
     * @param
     * @return
     */

    @PostMapping("/rebind")
    @ApiOperation(value = "银行卡重新绑定")
    public Result rebind(@RequestBody @Valid UserValidDto userValidDto) {
        return cardRebindService.rebind(userValidDto);
    }
}
